import 'package:flutter/material.dart';

class MyButton extends StatelessWidget {
  final String  text;
  final void Function()? onTop;
  const MyButton({super.key, required this.text, this.onTop});

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTop,
      child: Container(
        decoration: BoxDecoration(color: Color.fromARGB(109, 140, 94, 94),
            borderRadius: BorderRadius.circular(40)),
        padding: EdgeInsets.all(20),

        child: Row(
          // crossAxisAlignment: CrossAxisAlignment.start,
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text(text,
              style: TextStyle(color: Colors.white),),
            SizedBox(width: 10,),
            Icon(Icons.arrow_forward,color: Colors.white,)
          ],
        ),
      ),
    );
  }
}
